package com.muyu.system.domain;

import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;


/**
 * 产品评论对象 danmo_shopping_reviews
 *
 * @author yangle
 * @date 2024-09-29
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DanmoShoppingReviews extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 评论唯一标识
     */
    private Long id;

    /**
     * 产品规格ID
     */
    private Long specificationId;

    /**
     * 父评论ID
     */
    private Long fatherCommentId;

    /**
     * 关联产品ID
     */
    @Excel(name = "关联产品ID")
    private Long productId;

    /**
     * 关联用户ID
     */
    @Excel(name = "关联用户ID")
    private Long userId;

    /**
     * 评分（1到5星）
     */
    @Excel(name = "评分", readConverterExp = "1=到5星")
    private Long rating;

    /**
     * 评论内容
     */
    @Excel(name = "评论内容")
    private String comment;

    /**
     * 发布者姓名
     */
    private String nickname;

    /**
     * 发布者头像
     */
    private String avatar;

    /**
     * 商品类型名称
     */
    private String productTypeName;

    /**
     * 评价类型 (1.好评 2.图/视频 3.追评 4.中评 5.差评)
     */
    private Long type;

    /**
     * 评论图片信息
     */
    private List<DanmoShoppingReviewsPicture> danmoShoppingReviewsPictureList;
    private Integer pageNum = 1;
    private Integer pageSize = 10;

//    public void setId(Long id)
//    {
//        this.id = id;
//    }
//
//    public Long getId()
//    {
//        return id;
//    }
//    public void setProductId(Long productId)
//    {
//        this.productId = productId;
//    }
//
//    public Long getProductId()
//    {
//        return productId;
//    }
//    public void setUserId(Long userId)
//    {
//        this.userId = userId;
//    }
//
//    public Long getUserId()
//    {
//        return userId;
//    }
//    public void setRating(BigDecimal rating)
//    {
//        this.rating = rating;
//    }
//
//    public BigDecimal getRating()
//    {
//        return rating;
//    }
//    public void setComment(String comment)
//    {
//        this.comment = comment;
//    }
//
//    public String getComment()
//    {
//        return comment;
//    }
//
//    public List<DanmoShoppingReviewsPicture> getDanmoShoppingReviewsPictureList()
//    {
//        return danmoShoppingReviewsPictureList;
//    }
//
//    public void setDanmoShoppingReviewsPictureList(List<DanmoShoppingReviewsPicture> danmoShoppingReviewsPictureList)
//    {
//        this.danmoShoppingReviewsPictureList = danmoShoppingReviewsPictureList;
//    }



    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("productId", getProductId())
                .append("userId", getUserId())
                .append("rating", getRating())
                .append("comment", getComment())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("danmoShoppingReviewsPictureList", getDanmoShoppingReviewsPictureList())
                .toString();
    }
}
